﻿<navigation:Page x:Class="PicturePortfolio.Silverlight.Views.PreviewPhotoView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
           xmlns:ca="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480" Height="550" Width="680"
           Title="PreviewPhotoView Page">
    <Grid x:Name="LayoutRoot" Background="White" >
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <Border Background="Black" BorderThickness="1" BorderBrush="Gray" Grid.Row="0">
            <StackPanel Orientation="Vertical">
                <Image x:Name="ImageToDisplay" HorizontalAlignment="{Binding ImageHorizontalAllignment}" Margin="6" Height="{Binding PreviewImageHeight}" Width="{Binding PreviewImageWidth}"></Image>
                <ContentControl x:Name="ImageRelatedInfo" Height="{Binding ImageInfoHeight}" Width="680"></ContentControl>
            </StackPanel>
        </Border>
        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
            <Image x:Name="ShowHideComments" Source="/article-icon.png" ToolTipService.ToolTip="Comment(s)" Height="20" Width="20" HorizontalAlignment="Right" Visibility="{Binding IsShowAdminFunctionality}">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonUp">
                        <ca:ActionMessage MethodName="ShowHideComments">

                        </ca:ActionMessage>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                
            </Image>            
            <Image x:Name="DeletePhoto" Source="/appbar.delete.rest.png" ToolTipService.ToolTip="Delete Photo" Height="32" Width="32" HorizontalAlignment="Right" Visibility="{Binding IsShowAdminFunctionality}">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonUp">
                        <ca:ActionMessage MethodName="DeletePhoto">

                        </ca:ActionMessage>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Image>
        </StackPanel>
    </Grid>
</navigation:Page>
